Web application resource management

ABSTRACT

A resource manager for a network application, such as an application defined in a Web-browser, is provided. The manager requests resources the resource type and a priority defined for the resource in application. The manager is provided in a computer-readable medium having computer-executable instructions causing a computer to implement certain steps. These may include the steps of: interpreting resource requests from the Web browser based on resources required by a page; and issuing resource requests based on a user specified priority. The steps of interpreting and issuing may occur for all requests to a given domain.

BACKGROUND

The user experience on the World Wide Web has evolved from viewingstatic pages of information to more complete interaction with Web-basedapplications. Most users experience the Web through a Web Browserapplication such as Internet Explorer, Opera, Netscape or Firefox. Webbrowsers provide an essentially forms based environment to thedeveloper. Techniques for manipulating browsers, originally designed todisplay text and presentation information, have included the provisionof richer tools and HTML enhancements, including a client side scriptingenvironment—JavaScript—Cascading Style Sheets (CSS), and MacromediaFlash.

Web-applications are downloaded via potentially constrained connectionsto a server. As these applications get more interactive, the size ofcode and data can grow immensely. There is typically a conflict betweenproviding enriched client interactivity in a Web document whilemaintaining client performance. As pages increase in interactivity,their size increases, and download speed often decreases. Therefore, agoal of the developers is to remove bottlenecks often associated withadding behaviors. Perceived performance is tightly correlated torendering speed or how fast the first screen of content is displayed.

Currently, most Web applications request page elements by opening atmost two persistent connections between the browser and the server inaccordance with The Internet Engineering Task Force RFC 2616—HypertextTransfer Protocol—HTTP/1.1. While it is possible to modify thisparameter in many browsers to increase access to resources, most browsermanufactures adhere to the recommendations of RFC 2616. In addition,when Web-pages consisting of many external resources such as images,style sheets, scripts, and xml files, is loaded by the browser and theresources requested from a server, there is generally no definedordering to the retrieval of such resources. However, in a Web page,some resources, such as images, are often secondary to the overallexperience and should not block important operations such as executing adelete item or send mail command.

SUMMARY

Resource management in a network application, such as an applicationdefined in a Web-browser, is provided by a resource manager based on thetype and a priority defined for the resource in application. The managercreates a resource priority stack which allows a developer to managelimited network connections using resource priority and otherconsiderations.

In one embodiment, a computer-readable medium having computer-executableinstructions causing a computer to implement certain steps is provided.These may include the steps of: interpreting resource requests from theWeb browser based on resources required by a page; and issuing resourcerequests based on a user specified priority. The steps of interpretingand issuing may occur for all requests to a given domain.

Alternatively, a method of providing a Web-based application isprovided. The method includes a step of providing a resource managerinterpretable by a Web-browser to a browser on a client. In addition,the method includes responding to requests from a Web-Browser forresources required by a Web-page responsive to the resource managerbased on at least a resource priority definition stored in a Web-page.

Still further, a method of creating a Web page rendered on a computer isprovided. The method may include defining a call to a resource managerexecutable by a Web browser, and defining at least one resource linkincluding a resource identifier and a resource priority, the resourcelink interpretable by the resource manager.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a processing device suitable for implementing any of theprocessing devices in accordance with the present disclosure.

FIG. 2 depicts a multi-component Web page.

FIG. 3 depicts a server processing device and a client device suitablefor implementing the framework.

FIG. 4 depicts the request process executed by a resource managerdisclosed herein.

FIG. 5 depicts an execution process operated for a given domain inaccordance with the present disclosure.

DETAILED DESCRIPTION

A network service provides prioritized resource management for Web-basedapplications. Resources required by the application can be prioritized,and put or get requests implemented in prioritized order. The servicecreates a resource priority stack which allows a developer to manage thelimited connections between a browser and a server (or domain) byensuring high-priority requests occur before lower-priority requests.

In one embodiment, the service is operable on a general purposecomputing device which operates as a server or a client. With referenceto FIG. 1, an exemplary system for implementing the method and managerdescribed herein includes a general purpose computing device in the formof a computer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus also known as Mezzanine bus.

Computer 110 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 110 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can accessed by computer 110. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared and other wireless media. Combinations of the any of the aboveshould also be included within the scope of computer readable media.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 140 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through an non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 1, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 20 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). A monitor191 or other type of display device is also connected to the system bus121 via an interface, such as a video interface 190. In addition to themonitor, computers may also include other peripheral output devices suchas speakers 197 and printer 196, which may be connected through a outputperipheral interface 190.

The computer 110 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer180. The remote computer 180 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 110, although only a memory storage device 181 has beenillustrated in FIG. 1. The logical connections depicted in FIG. 1include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the computer 110 is connectedto the LAN 171 through a network interface or adapter 170. When used ina WAN networking environment, the computer 110 typically includes amodem 172 or other means for establishing communications over the WAN173, such as the Internet. The modem 172, which may be internal orexternal, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

FIG. 2 illustrates a Web page 200 rendered in a browser and havingmultiple components. The components may include a menu 210, search box215 and content modules 220, 222, 224, 226, 228, 230. Each modulecontains content and presentation information, and may further includeeffects and customizable options such as a stock list. Each section ofthe page 200 may be enabled by content and presentation informationembedded in the BODY of the page, or scripts embedded in the page. Asshould be readily understood, each module could comprise an application(such as a text editor, spell checker or other Web-based application).

As discussed below, the resources (images, content, scripts, etc.)required by the page are managed for download by the network service,allowing developers to control how resources are requested and used. Asan example, suppose one of the modules on page 200 is an emailcomposition window including a “send mail” button which, when selectedby the user, operates a post command in the browser to transmit mailfrom the module to the server to transmit an email message. A pagedeveloper may specify that the send mail command take a higher prioritythan all other resources vying for interaction with the applicationserver. This command may then take priority over an image download orpage refresh.

FIG. 3 is a block diagram illustrating an exemplary environment forimplementing the network manager including an application server 302 anda client processing device 304. Both the application server and theclient processing device can be implemented by a processing device inaccordance with FIG. 1. The application server and processing device maybe coupled by a network connection including a local area connection,wide area connection, or a combination thereof such as the Internet. Theapplication server 302 includes a Web server process 340 responding torequests from a browser application 312 on the client processing device.The application server 302 also includes a plurality of Web pages 310which may be provided to the client device by the Web server, andresources such as scripts 320, style sheets 322, and images 324 used inthe pages 310.

The client device 304 includes, for example, a Web browsing application312 which may interpret resources required by the page and interpretedby the browser. Also illustrated as present in the device are downloadedpages 310 a, content 342, images 344 and scripts 346 used by the browserin rendering the pages in browser 312.

In one embodiment, a resource manager 352 is provided on the clientdevice and manages the deployment of page resources. The resourcemanager can download resources asynchronously and in parallel leading tobetter Web page performance. Multiple requests for resources can beshared, thereby increasing the overall actual and perceived performanceto the user. The more the user visits the application server, the fasterthe network runs as there is a continually increasing probability thatprerequisite files are cached.

As will be readily understood, the Web server responds to requests froma browser 312, operating on the client device 304. The resource manager352 may be included in the browser application or delivered to theclient device 304 by the Web server. The resource manager may beimplemented by one or more script files, such as JavaScript files, whichcan be interpreted by the browser 312. Any number of script files can beused, one or more of which provides core functionality describe hereinand one or more of which provides compatibility for various differentbrowser applications.

When provided as a script file, the resource manager can be invoked by astandard <script> command embedded in a Web page. Use of the scriptcommand in the page will cause the script to be downloaded in instanceswhere the manager has not been previously downloaded, or reused from theclient memory if the script is invoked and already downloaded for thebrowser session.

In general, the resource manager operates by creating a network stack345 queuing and controlling requests within the browser application bytype and priority. The network stack 345 provides a prescribed approachfor managing a Web application's server requests. The network stackallows every request to have an associated priority. If a high-priorityrequest is added to the stack, on the first available opportunity, thatrequest will be executed (and all lower priority requests will follow).

FIG. 4 shows the general operation adding requests to the network stack.At step 402, a new resource is requested. As will be generallyunderstood, each resource for a page is identified by a uniform resourcelocator (URL) specifying a unique location on the application server. Inone embodiment, the network stack supports XMLPost, XMLGet, imagerequests, style sheet requests and script requests. To establish arequest, a page developer calls a network object which includes a typeargument, and a URL for the resource. The developer may optionallyspecify a context argument, a call back function, a priority argument, apost argument string, a header array and flags indicating whether therequest is a serialized request or a duplicate request.

The type argument specifies the type of resource being requested. Typesmay include XML Get, XML Post, Script, Image and CSS. The URL argumentspecifies the URL of the resource requested. A context argument createsan object of any of the above types which passes a callback after theresource is retrieved. This is useful for passing state through therequest. A callback function may be specified which is called after theresource is retrieved. If null is specified, the resource will bedownloaded but no notification will be provided when this occurs.

A priority argument may be specified to identify the importance of therequest relative to other requests. If no priority is specified, adefault priority may be assigned by type. For example, images maydefault to low, scripts default to high, and all other resources defaultto medium. In one embodiment, a “high”, “medium”, or “low” priority maybe specified. Additional levels of priority may be utilized inalternative embodiments of the manager.

A post string argument may be specified to a for XML requests. An headerarray object may provide an associative array of headers to be specifiedfor resources of type XMLPost or XMLGet.

Flags in a request (of any type) specify whether the request is aserialized, parallel, and/or a unique request. A timeout argument may bespecified to specify the longest duration a request should executebefore considered timing out. Typically one can rely on the browser totimeout a request and that will be handled appropriately.

Returning to FIG. 4, initially, at step 404, a determination will bemade as to whether a network stack exists for the domain. If no stackexists for the domain, one is created at step 406. Stacks are created ona per-domain basis. It should be understood that a domain may compriseone or more application servers addressable through a common reference,such as a domain name or IP address.

Once the stack is created, a determination is made at step 408 as towhether the request 402 is a serialized or parallel request. Theresource manager supports two types of requests—serial and parallel.Parallel requests take advantage of the ability of the browser tomaintain two concurrent connections with the domain by using theconnections simultaneously. One advantage of this feature is thatparallel requests can download scripts simultaneously. Normally, ascript call in a Web page locks browser actions while downloading thescript. The browser remains locked until the entire script isdownloaded. The resource manager removes this bottleneck and allowsscripts to be downloaded in parallel. Serialized requests allow the pagedesigner to request resources in a specific order. Only one serializedrequest will occur at a time while parallel requests may be runningsimultaneously. When there are items in the serialized stack and noserialized requests are executing, the serialized request is guaranteedthe next open slot, i.e. a serialized request takes precedence over theparallel stack.

In one embodiment, all requests may run parallel by default. In thisembodiment, a developer must force a request to be serialized.

If the request is a serialized request, then at step 412, the managerwill determine whether the request is a duplicate request. The resourcemanager can recognize duplicate requests for the same resource from thesame browser session, and manage the requests to prevent downloading thesame resource twice. In one embodiment, by default, any requests thatcompletely match an existing request (including any callback) will notbe executed. If a new request matches an existing request but has adifferent callback, only make a single request is made by the resourcemanager and multiple callbacks are handled when the item is returned. Ifmultiple requests are present to the same domain, the resource managerrecognizes that all five are going to the same URL with the samearguments, and lets the highest one exist, then fans out the call backto all requests.

If the request is not a duplicate request, at step 424 a new request ispushed onto the serialized stack. If the request is a duplicate request,then at step 414, a determination is made as to whether a unique requesthas been specified. If the request is a unique request, then at step 424the unique, serialized request is pushed onto the serialized stack. Ifit is not specified as a unique request, then it is attached to anexisting serialized request in the serialized stack at 416

Returning to step 408, if the request is not a serialized request, thenat step 418 a determination is made as to whether a unique request hasbeen specified. If the request is a unique request, then at step theunique is pushed onto the parallel stack at 426. If it is not specifiedas a unique request, then it is attached to an existing serializedrequest in the parallel stack at 422.

In a further aspect, the resource manager allows developers to group abatch of requests together. In such embodiment, a group argument allowsindependent requests to be grouped into a batch. An abort function isprovided to allow individual requests in a batch of grouped requests tobe aborted, whether executing or pending. This is useful when, forexample, one wishes to simulate a traditional Web-page navigation modelwhere navigating away from the page preempts requests. One can use thisto support similar functionality within a Web-page to provide increasedperformance. For example, where a user switches views in the middle of apage or component loading, one can stop grouped requests for the priorview. An “abort all” function is also provided for group requests.

Additionally, multiple requests may be treated as a unit. This allowsyou to specify a single callback to occur as the result of thedownloading of one to many resources. For example, if you require twoscripts, a stylesheet, and an image before you can continue, you canspecify a callback to occur when all those resources are available.

FIG. 5 is a flowchart illustrating the execution of requests in thenetwork stack in one embodiment of the resource manager.

At step 502, a new request is added to the stack and queued until lessthan three running requests are present on the stack as indicated atstep 504. Once less than three running requests are present, then atstep 506, a determination is made as to whether there are any serialrequests currently running. If there are no serial requests running, adetermination is made as to whether there are outstanding serialrequests in the stack at step 512. If so, then at step 514, the nextserialized request is popped from the stack and executed at step 516.

If there are running serial requests at 506, or if there are no runningserial requests (506) and no outstanding serial requests in the stack at512, then at step 508 a determination is made as to whether there areany outstanding parallel requests in the stack. (Since the request 502was added to the stack, and the request must be a serial or parallelrequest, the output of step 512 or 508 must be yes). At step 510, thenext parallel request is popped from the stack and executed at step 516.

At step 518, a determination is made as to whether the request iscompleted and when completed, a notification is generated at 520. Step522 decrements the count of running requests relative to the runningrequests determination at step 504.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

1. A computer-readable medium having computer-executable instructionscausing a computer to implement the steps of: (a) interpreting resourcerequests from the Web browser based on resources required by a page; and(b) issuing resource requests based on a user specified priority.
 2. Thecomputer readable medium of claim 1 wherein said steps of interpretingand issuing occur for requests to a domain.
 3. The computer readablemedium of claim 1 wherein said step of interpreting includesinterpreting at least two requests as a batch requests.
 4. The computerreadable medium of claim 1 wherein said step of issuing includes issuingat least a first and a second parallel request to one domain.
 5. Thecomputer readable medium of claim 1 wherein said step of interpretingincludes determining whether a request is a parallel or serial request.6. The computer readable medium of claim 5 wherein said step of issuingcreates a serial request prior to any parallel request.
 7. The computerreadable medium of claim 1 wherein the method further includes notifyinga process that a request is complete.
 8. The computer readable medium ofclaim 1 wherein said step of interpreting determines whether duplicaterequests to a domain have been made and the issuing step comprisesissuing only one of said duplicate requests.
 9. The computer readablemedium of claim 8 wherein the method further includes the step ofreturning any resource requested in said duplicate requests to eachrequester.
 10. The computer-readable medium of claim 1 wherein theobjects include a type comprising XMLPost, XMLGet, image requests, stylesheet requests or script requests.
 11. A method of providing a Web-basedapplication, comprising: providing a resource manager interpretable by aWeb-browser to a browser on a client; and responding to requests from aWeb-Browser for resources required by a Web-page responsive to theresource manager based on at least a resource priority definition storedin a Web-page.
 12. The method of claim 11 wherein said step of providingresources includes providing resources from a domain in parallel. 13.The method of claim 12 wherein said step of providing includes providingtwo script files in parallel.
 14. The method of claim 11 wherein saidstep of providing a resource manager includes providing a JavaScriptfile including the resource manger.
 15. The method of claim 11 whereinsaid step of responding includes responding to a request including oneof an XMLPost request, XMLGet request, an image request, style sheetrequests or a script request.
 16. A method of creating a Web pagerendered on a computer, comprising: defining a call to a resourcemanager executable by a Web browser; defining at least one resource linkincluding a resource identifier and a resource priority, the resourcelink interpretable by the resource manager.
 17. The method of claim 16wherein the step of defining at least one resource link includesdefining a resource type.
 18. The method of claim 16 wherein the step ofdefining at least one resource link includes specifying a request for aresource as a unique request.
 19. The method of claim 16 wherein step ofdefining at least one resource link includes calling a callbackfunction.
 20. The method of claim 16 wherein step of defining at leastone resource link includes specifying the request as a serial orparallel request.